import 'package:ca_dsp_pro/src/tool/assets.dart';
import 'package:flutter_kit_dsp/flutter_kit_dsp.dart';

import 'my_setting_controller.dart';

class MySetting extends GetView<MySettingController> {
  const MySetting({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.black.withAlpha(140),
      child: Center(
        child: Container(
          padding: const EdgeInsets.only(left: 5, bottom: 5, right: 5, top: 0),
          width: 300,
          height: 218,
          decoration: BoxDecoration(
            color: Colors.black,
            border: Border.all(color: Colors.white, width: 0.5),
            borderRadius: BorderRadius.circular(10),
            boxShadow: const [BoxShadow(color: Colors.black, offset: Offset(0, 0), blurRadius: 20, spreadRadius: 0)],
          ),
          child: Column(
            children: [
              const SizedBox(
                height: 30,
                child: Center(child: Text('Settings')),
              ),
              Expanded(
                child: Container(
                  decoration: BoxDecoration(
                    color: Color_bg_view2,
                    borderRadius: BorderRadius.circular(5),
                  ),
                  child: ListView.separated(
                    itemCount: controller.items.length,
                    physics: const NeverScrollableScrollPhysics(),
                    itemBuilder: (context, index) {
                      return SizedBox(
                        height: 30,
                        child: ElevatedButton(
                          onPressed: () {},
                          child: Text(controller.items[index]),
                        ),
                      );
                    },
                    separatorBuilder: (BuildContext context, int index) {
                      return Container(
                          height: 0.5, color: Colors.black, margin: const EdgeInsets.symmetric(horizontal: 5));
                    },
                  ),
                ),
              )
            ],
          ),
        ),
      ),
    );
  }
}
